using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Collapse Container Rule</para>
    /// <para>Adds a diagram rule that automatically collapses container contents during the building of diagrams based on an existing template. This rule collapses the entire contents of containers in the diagrams.</para>
    /// <para>添加一个关系图规则，该规则在基于现有模板生成关系图期间自动折叠容器内容。此规则折叠关系图中容器的全部内容。</para>
    /// </summary>    
    [DisplayName("Add Collapse Container Rule")]
    public class AddCollapseContainerRule : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddCollapseContainerRule()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_container_type">
        /// <para>Container Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the geometry type of the container source class or object table the rule will process.</para>
        ///   <bulletList>
        ///     <bullet_item>Junctions only—The Collapse Container rule will process the junction container source classes and object tables only. Only the polygon container source classes, point container source classes, and container junction object tables will be processed.</bullet_item><para/>
        ///     <bullet_item>Edges only—The Collapse Container rule will process the edge container source classes and object tables only. Only the linear container source classes or container edge object tables will be processed.</bullet_item><para/>
        ///     <bullet_item>Both junctions and edges—The Collapse Container rule will process any container source classes and object tables regardless of their type. Both junction and edge types will be processed. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定规则将处理的容器源类或对象表的几何类型。</para>
        ///   <bulletList>
        ///     <bullet_item>仅交汇点 - 折叠容器规则将仅处理交汇点容器源类和对象表。仅处理多边形容器源类、点容器源类和容器交汇点对象表。</bullet_item><para/>
        ///     <bullet_item>仅边 - 折叠容器规则将仅处理边容器源类和对象表。将仅处理线性容器源类或容器边缘对象表。</bullet_item><para/>
        ///     <bullet_item>交汇点和边 - 折叠容器规则将处理任何容器源类和对象表，无论其类型如何。将处理交汇点类型和边类型。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_inverse_source_selection">
        /// <para>Rule Process</para>
        /// <para><xdoc>
        ///   <para>Specifies how the rule will process the specified container source classes and object tables.</para>
        ///   <bulletList>
        ///     <bullet_item>Exclude source classes—Containers that are based on the specified source classes and object tables will not be collapsed, while other containers will be collapsed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Include source classes—Containers that are based on the specified source classes and object tables will be collapsed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定规则将如何处理指定的容器源类和对象表。</para>
        ///   <bulletList>
        ///     <bullet_item>排除源类 - 基于指定源类和对象表的容器不会折叠，而其他容器将被折叠。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>包括源类 - 基于指定源类和对象表的容器将被折叠。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public AddCollapseContainerRule(object _in_utility_network, object _template_name, _is_active_value _is_active, _container_type_value _container_type, _inverse_source_selection_value _inverse_source_selection)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
            this._container_type = _container_type;
            this._inverse_source_selection = _inverse_source_selection;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Collapse Container Rule";

        public override string CallName => "nd.AddCollapseContainerRule";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _container_type.GetGPValue(), _inverse_source_selection.GetGPValue(), _container_sources, _description, _out_utility_network, _out_template_name, _reconnected_edges_option.GetGPValue()];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Container Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the geometry type of the container source class or object table the rule will process.</para>
        ///   <bulletList>
        ///     <bullet_item>Junctions only—The Collapse Container rule will process the junction container source classes and object tables only. Only the polygon container source classes, point container source classes, and container junction object tables will be processed.</bullet_item><para/>
        ///     <bullet_item>Edges only—The Collapse Container rule will process the edge container source classes and object tables only. Only the linear container source classes or container edge object tables will be processed.</bullet_item><para/>
        ///     <bullet_item>Both junctions and edges—The Collapse Container rule will process any container source classes and object tables regardless of their type. Both junction and edge types will be processed. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定规则将处理的容器源类或对象表的几何类型。</para>
        ///   <bulletList>
        ///     <bullet_item>仅交汇点 - 折叠容器规则将仅处理交汇点容器源类和对象表。仅处理多边形容器源类、点容器源类和容器交汇点对象表。</bullet_item><para/>
        ///     <bullet_item>仅边 - 折叠容器规则将仅处理边容器源类和对象表。将仅处理线性容器源类或容器边缘对象表。</bullet_item><para/>
        ///     <bullet_item>交汇点和边 - 折叠容器规则将处理任何容器源类和对象表，无论其类型如何。将处理交汇点类型和边类型。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Container Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _container_type_value _container_type { get; set; }

        public enum _container_type_value
        {
            /// <summary>
            /// <para>Junctions only</para>
            /// <para>Junctions only—The Collapse Container rule will process the junction container source classes and object tables only. Only the polygon container source classes, point container source classes, and container junction object tables will be processed.</para>
            /// <para>仅交汇点 - 折叠容器规则将仅处理交汇点容器源类和对象表。仅处理多边形容器源类、点容器源类和容器交汇点对象表。</para>
            /// </summary>
            [Description("Junctions only")]
            [GPEnumValue("JUNCTIONS")]
            _JUNCTIONS,

            /// <summary>
            /// <para>Edges only</para>
            /// <para>Edges only—The Collapse Container rule will process the edge container source classes and object tables only. Only the linear container source classes or container edge object tables will be processed.</para>
            /// <para>仅边 - 折叠容器规则将仅处理边容器源类和对象表。将仅处理线性容器源类或容器边缘对象表。</para>
            /// </summary>
            [Description("Edges only")]
            [GPEnumValue("EDGES")]
            _EDGES,

            /// <summary>
            /// <para>Both junctions and edges</para>
            /// <para>Both junctions and edges—The Collapse Container rule will process any container source classes and object tables regardless of their type. Both junction and edge types will be processed. This is the default.</para>
            /// <para>交汇点和边 - 折叠容器规则将处理任何容器源类和对象表，无论其类型如何。将处理交汇点类型和边类型。这是默认设置。</para>
            /// </summary>
            [Description("Both junctions and edges")]
            [GPEnumValue("BOTH")]
            _BOTH,

        }

        /// <summary>
        /// <para>Rule Process</para>
        /// <para><xdoc>
        ///   <para>Specifies how the rule will process the specified container source classes and object tables.</para>
        ///   <bulletList>
        ///     <bullet_item>Exclude source classes—Containers that are based on the specified source classes and object tables will not be collapsed, while other containers will be collapsed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Include source classes—Containers that are based on the specified source classes and object tables will be collapsed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定规则将如何处理指定的容器源类和对象表。</para>
        ///   <bulletList>
        ///     <bullet_item>排除源类 - 基于指定源类和对象表的容器不会折叠，而其他容器将被折叠。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>包括源类 - 基于指定源类和对象表的容器将被折叠。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rule Process")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _inverse_source_selection_value _inverse_source_selection { get; set; }

        public enum _inverse_source_selection_value
        {
            /// <summary>
            /// <para>Exclude source classes</para>
            /// <para>Exclude source classes—Containers that are based on the specified source classes and object tables will not be collapsed, while other containers will be collapsed. This is the default.</para>
            /// <para>排除源类 - 基于指定源类和对象表的容器不会折叠，而其他容器将被折叠。这是默认设置。</para>
            /// </summary>
            [Description("Exclude source classes")]
            [GPEnumValue("EXCLUDE_SOURCE_CLASSES")]
            _EXCLUDE_SOURCE_CLASSES,

            /// <summary>
            /// <para>Include source classes</para>
            /// <para>Include source classes—Containers that are based on the specified source classes and object tables will be collapsed.</para>
            /// <para>包括源类 - 基于指定源类和对象表的容器将被折叠。</para>
            /// </summary>
            [Description("Include source classes")]
            [GPEnumValue("INCLUDE_SOURCE_CLASSES")]
            _INCLUDE_SOURCE_CLASSES,

        }

        /// <summary>
        /// <para>Container Sources</para>
        /// <para><xdoc>
        ///   <para>The container source class (or classes) and object table (or tables) that will be excluded or included during the Collapse Container rule execution depending on the chosen rule process.</para>
        ///   <para>If Rule Process is Exclude source classes (inverse_source_selection = "EXCLUDE_SOURCE_CLASSES" in Python), the rule can be configured without specifying a particular network source class or object table, in which case it will collapse contents of any container source classes and object tables in the generated diagrams. However, if Rule Process is Include source classes (inverse_source_selection = "INCLUDE_SOURCE_CLASSES" in Python), the particular container source class (or classes) or object table (or tables) to be collapsed must be specified.</para>
        ///   <para>When Exclude source classes (inverse_source_selection = "EXCLUDE_SOURCE_CLASSES" in Python), the contents related to any container features or container objects belonging to the specified classes or object tables will not be collapsed in the generated diagrams, while contents related to container features and container objects that don't belong to those classes and object tables will be collapsed. Conversely, when Rule Process is Include Source Classes (inverse_source_selection = "INCLUDE_SOURCE_CLASSES" in Python), the contents related to any container features and container objects belonging to the specified source classes and object tables will be collapsed in the generated diagrams, while contents related to container features and container objects that don't belong to those source classes and object tables will not be collapsed.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在折叠容器规则执行期间将排除或包含的容器源类（或多个类）和对象表（或多个表），具体取决于所选的规则进程。</para>
        ///   <para>如果“规则进程”为“排除源类”（Python 中的 inverse_source_selection = “EXCLUDE_SOURCE_CLASSES”），则可以在不指定特定网络源类或对象表的情况下配置规则，在这种情况下，它将折叠生成的逻辑示意图中任何容器源类和对象表的内容。但是，如果规则流程为“包括源类”（在 Python 中inverse_source_selection = “INCLUDE_SOURCE_CLASSES”），则必须指定要折叠的特定容器源类（或多个类）或对象表。</para>
        ///   <para>当排除源类（Python 中为 inverse_source_selection = “EXCLUDE_SOURCE_CLASSES”）时，与属于指定类或对象表的任何容器功能或容器对象相关的内容将不会在生成的逻辑示意图中折叠，而与不属于这些类和对象表的容器功能和容器对象相关的内容将被折叠。相反，当规则流程为“包括源类”（Python 中为 inverse_source_selection = “INCLUDE_SOURCE_CLASSES”） 时，与属于指定源类和对象表的任何容器功能和容器对象相关的内容将在生成的逻辑示意图中折叠，而与不属于这些源类和对象表的容器功能和容器对象相关的内容将不会折叠。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Container Sources")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _container_sources { get; set; } = null;


        /// <summary>
        /// <para>Description</para>
        /// <para>The description of the rule.</para>
        /// <para>规则的说明。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Description")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _description { get; set; } = null;


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        /// <summary>
        /// <para>Aggregate reconnected edges</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will aggregate the edges that are reconnected to the collapsed container junctions.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Any edge connecting a content junction will be kept and reconnected to the collapsed container junction.  </bullet_item><para/>
        ///     <bullet_item>Checked—Any edge connecting a content junction will be replaced by a reduction edge that is reconnected to the collapsed container junction. Multiple edges between two collapsed junctions will be systematically aggregated under the same reduction edge. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定规则是否聚合重新连接到折叠容器交汇点的边。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 连接内容交汇点的任何边都将保留并重新连接到折叠的容器交汇点。</bullet_item><para/>
        ///     <bullet_item>选中 - 连接内容交汇点的任何边都将替换为重新连接到折叠容器交汇点的缩减边。两个折叠交汇点之间的多个边将系统地聚合在同一缩减边下。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Aggregate reconnected edges")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reconnected_edges_option_value _reconnected_edges_option { get; set; } = _reconnected_edges_option_value._true;

        public enum _reconnected_edges_option_value
        {
            /// <summary>
            /// <para>AGGREGATE_RECONNECTED_EDGES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("AGGREGATE_RECONNECTED_EDGES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DONT_AGGREGATE_RECONNECTED_EDGES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DONT_AGGREGATE_RECONNECTED_EDGES")]
            [GPEnumValue("false")]
            _false,

        }

        public AddCollapseContainerRule SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}